<?php
	$css_list[0]['url'][] = './tpl/css/tweetlist.css';
	$css_list[0]['url'][] = './tpl/css/topic.css';
?>
<!--{template inc/header}-->
<div id="body" class="fm960">
	<!--{if $group_detail}-->
	<div class="bar_title">
		<div class="piece_bd" style="background:url('{getimg $group_detail['img'] 960 150 1}') no-repeat ;">
			<div class="b_info r5">
				<img src="{getimg $group_detail['icon'] 100 100 1}" alt="" class="fl forum_logo" height="48"  >
				<div class="b_n">
					<h1 class="bar_title">{$group_detail['name']}</h1>
					{lang caeate_yu}：{date $group_detail['create_time'] 'Y-m-d'}
				</div>
			</div>
			<ul class="b_tab">
				<li><a href="{u group/detail fid=$forum_id}" class="f_b">小组首页</a></li>
				<li><a href="{u group/detail fid=$forum_id,type=best}" class="f_b">{lang editor_best}</a></li>
                <li><a href="{u group/users fid=$forum_id}" class="f_b">成员列表</a></li>
			</ul>
		</div>
	</div>
	<!--{else}-->
	<div class="piece1_hd"></div>
	<!--{/if}-->
	<div class="piece1_bd" style="background:#fff;">
		<div id="content" class="fl">
			<div class="piece2">
				<div class="piece2_bd">
					<div id="topic_head">
						<div class="topic_info">
							<!--{getuser $topic['uid'] 0 'm,64' ',u_name fl'}-->
							<div>
								<h1>{$topic['title']}</h1>
								<br />
								{lang thread_starter}：<!--{getuser $topic['uid'] 1 '' 'u_name'}--><br />
								{lang create_yu}：<a href="{$topic['share']['url']}" target="_blank">{$topic['time']}</a> 
								<span style="padding: 0 10px;">{lang post_count}：<a href="#publish_topic" >{$topic['post_count']}</a></span><br />
							</div>
						</div>
						<!--{if $topic['uid'] == $_FANWE['uid'] || $is_group_admin == 1}-->
						<ul class="detail_toolbar clear_in mb15" tid="{$topic['tid']}">
							<li><a href="{u topic/edit tid=$topic['tid']}">修改</a></li>
							<li><a class="del_topic" href="javascript:;" onclick="$.Remove_Topic($topic['tid'],this,'{u group/detail fid=$forum_id}');">删除</a></li>
						</ul>
						<!--{/if}-->
						<pre class="topic_intro">{anchor $topic['content']}</pre>
						<div class="topitter" id="topitter_{$topic['share_id']}">
							<div class="pics">
								<!--{loop $topic['share']['imgs'] $img}-->
								<?php $bu_share_img = getImgName($img['img'],0,0,0,1); ?>
								<!--{if $img['type'] == 'm'}-->
								<div class="SHOW_BIG_PIC r3 img" w="tpc">
									<a class="add_to_album_btn" href="javascript:;" style="display: none;" onclick="$.Show_Rel_Album($img['id'],'photo');"></a>
									<div class="tlc">
										<img original="{getimg $img['img'] 468 468}" src="./tpl/images/lazyload.gif" class="fl lazyload" scaleType="1" scaleWidth="468" scaleHeight="468" updateParentSize="1"/>
										<!--{if !empty($img['alt'])}-->
										<p>{$img['alt']}</p>
										<!--{/if}-->
									</div>
								</div>
								<!--{else}-->
								<div class="r3 g img" w="tpc">
									<a class="add_to_album_btn" href="javascript:;" style="display: none;" onclick="$.Show_Rel_Album($img['id'],'goods');"></a>
									<div class="tlc">
										<img original="{getimg $img['img'] 468 468}" src="./tpl/images/lazyload.gif" class="fl lazyload" scaleType="1" scaleWidth="468" scaleHeight="468" updateParentSize="1"/>
										<!--{if !empty($img['alt'])}-->
										<p>{$img['alt']}</p>
										<!--{/if}-->
									</div>
									<div class="pic_b_hd">
										<div class="pic_b_hd">
											<a class="mg_slink ofh" href="{$img['to_url']}" c="" s="" target="_blank" ref="nofollow">{cutstr $img['name'] 30}</a>
											<div class="g_p"><span>{echo priceFormat($img['price'])}</span></div>
											<a href="{$img['to_url']}" class="buy_it" target="_blank"/></a>
										</div>
									</div>
								</div>
								<!--{/if}-->
								<!--{/loop}-->
								<br class="clear">
							</div>
							<div class="wb_infobar">
								<!-- Baidu Button BEGIN -->
								<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" style="float:right; margin:-3px 0 0 10px;">   
									<a class="bds_tsina"></a>
									<a class="bds_tqq"></a>
									<a class="bds_renren"></a>
									<a class="bds_qzone"></a>
									<span class="bds_more"></span>
								</div>
								<script type="text/javascript" id="bdshare_js" data="type=tools&mini=1" ></script> 
								<script type="text/javascript" id="bdshell_js"></script> 
								<script type="text/javascript">
									//在这里定义bds_config
									var bds_config = {"bdText":"<?php echo $topic['title'].' '.cutstr($topic['share_content'],200); ?>"};
									<!--{if isset($bu_share_img)}-->
									bds_config.bdPic = "{$bu_share_img}";
									<!--{/if}-->
									document.getElementById('bdshell_js').src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
								</script>
								<!-- Baidu Button END -->
								<a href="javascript:void(0);" class="fw " onclick="$('.TOPIC_RELAY').toggle();">{lang share_relay}</a>
								<!--{if $topic['share']['share_data'] != 'default'}--> 
								<a w="tpk" href="javascript:;" class="fav" onclick="$.Fav_Share({$topic['share_id']},this,32,'#topitter_{$topic['share_id']}');"></a>
								<div class="favDiv"><span class="favCount SHARE_FAV_COUNT">{$topic['share']['collect_count']}</span><i></i></div>
								<!--{/if}-->
							</div>
							<div class="TOPIC_RELAY cf_b" style="display:none;">
								<form>
								<img class="cf_a" src="./tpl/images/commnet_arrow.png">
								<div class="cf_pub_b r5">
									<a href="javascript:;" onclick="$.Show_Expression(this);" class="fl"><img w="f" class="add_face fl" src="./tpl/images/add_face_c.png"></a>
									<textarea class="PUB_TXT pub_txt fl rl3" name="content" position="0"></textarea>
									<input type="button" class="pub_btn fl rr3" value="{lang share_relay}"  onclick="$.Add_Share_Relay(this)">
									<div class="cf_opt">
										<input type="checkbox" class="c_cb" name="is_comment_parent" value="1" checked="checked"><label for="c_cb">{lang also_one_comment}</label>
									</div>
									<input type="hidden" name="share_id" value="{$topic['share_id']}" />
								</div>
								</form>
							</div>
							<ul class="SHARE_FAV_LIST u_like">
								<!--{loop $user_share_collect $collect_uid}-->
								<li><!--{getuser $collect_uid 0 's,32' ',icard r3'}--></li>
								<!--{/loop}-->
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div id="topic_body">
				<div class="piece2 mt20">
					<div id="topic_discussion_list" class="piece2_bd">
						<?php
							$post_topic_tid = $topic['tid'];
							$post_topic_module = 'topic';
							$post_topic_action = 'post';
						?>
						<!--{template inc/share/topic_publish}-->
						<!-- 微博列表 -->
						{$post_html}
						<!-- 分页  -->
					</div>
				</div>
				<div class="piece2 mt20">
					<div class="piece2_bd whocare topic_detail_right">
						<h2>{lang who_look_topic}</h2>
						<ul>
							<!--{loop $topic_looks $look_uid $temp}-->
							<li><!--{getuser $look_uid 0 'm,48' ',u_name'}--></li>
							<!--{/loop}-->
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div id="sidebar" class="fr">
			<div class="piece3 mt20">
				<div class="piece3_bd topic_detail_right" id="follow_box">
					<!--{subtemplate inc/group/best_user}-->
				</div>
			</div>
			<div class="piece3 mt20">
				<div class="piece3_bd topic_detail_right">
					<h2>{$topic_user['short']}{lang now_send_topic}</h2>
					<ul class="other_topic_list">
						<!--{loop $user_new_topics $new_topic}-->
						<li><a href="{$new_topic['url']}">{cutstr $new_topic['title'] 42}</a></li>
						<!--{/loop}-->
					</ul>
				</div>
			</div>
			<div class="piece3 mt20">
				<div class="piece3_bd topic_detail_right">
					<h2>{$topic_user['short']}加入的小组</h2>
					<ul class="other_group_list">
						<!--{loop $user_groups['list'] $group_item}-->
						<li>
							<a target="_blank" href="{u group/detail fid=$group_item['fid']}"><img class="tg_cover" src="{getimg $group_item['icon']['img'] 100 100 1}" height="64"></a>
							<a target="_blank" href="{u group/detail fid=$group_item['fid']}">{cutstr $group_item['name'] 16}</a>
						</li>
						<!--{/loop}-->
					</ul>
				</div>
			</div>
			<div class="piece3 mt20">
				<div class="piece3_bd topic_detail_right">
					<h2>该小组的其他精彩主题</h2>
					<ul class="other_good_topic">
						<!--{loop $topic_bests $best_topic}-->
						<li class="ogt_li">
							<a class="fl" target="_blank" href="{$best_topic['url']}"><img class="r3" alt="" src="{getimg $best_topic['imgs'][0]['img'] 100 100}" width="100"></a>
							<div class="ogt_topicinfo">
								<h4 class="ogt_title"><a target="_blank" href="{$best_topic['url']}">{$best_topic['title']}</a></h4>
								<p class="ogt_detail">{$best_topic['content']}</p>
								<a class="ogt_reply" target="_blank" href="{$best_topic['url']}">{$best_topic['post_count']}回应</a>
							</div>
						</li>
						<!--{/loop}-->
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div class="piece1_ft"></div>
</div>
<script type="text/javascript">
jQuery(function($){
<!--{if getIsManage('club')}-->
	$('#content .piece2:first').hover(function(e){
		$.GetManageMenu('club',{$tid},this,e);
	},function(){});
	
	$('#SHARE_DETAIL_LiST .t_f').live('mouseover',function(e){
		var shareID = this.getAttribute('shareID');
		if(shareID)
			$.GetManageMenu('share',shareID,this,e);
	});
<!--{/if}-->
});

function updateTopicBest(result)
{
	$("#follow_box").html(result.html);
}
</script>
<!--{template inc/footer}-->